# -*- coding: utf-8 -*-
# frontend/pages/06_🖥️_系统监控.py
import streamlit as st
import plotly.graph_objects as go
import plotly.express as px
import pandas as pd
import time
from datetime import datetime, timedelta
import random
import psutil
import os

st.set_page_config(
    page_title="🖥️ 系统监控",
    page_icon="🖥️",
    layout="wide"
)

def get_system_info():
    """获取系统信息"""
    try:
        cpu_percent = psutil.cpu_percent(interval=1)
        memory = psutil.virtual_memory()
        disk = psutil.disk_usage('/')
        
        return {
            'cpu_percent': cpu_percent,
            'memory_percent': memory.percent,
            'memory_used': memory.used / (1024**3),  # GB
            'memory_total': memory.total / (1024**3),  # GB
            'disk_percent': disk.percent,
            'disk_used': disk.used / (1024**3),  # GB
            'disk_total':
